import {customeStruct} from '../utils';
const itf = customeStruct.interface;
export const InitData = itf({
    payload: itf({
        isDealerUser: 'boolean? | null',
        tradeMethods: [itf({
            id: 'string',
            code: 'string',
            name: 'string'
        })]
    })
});
export const Brands = itf({
    payload: itf({
        content: [itf({
            id: 'string',
            code: 'string',
            name: 'string'
        })]
    })
});

export const List = itf({
    payload: itf({
        content: [itf({
            id: 'string',
            rowVersion: 'string',
            options: ['string'],
        })],
        totalElements: 'number'
    })
});

export const Detail = itf({
    payload: itf(
        {
            id: 'string',
            rowVersion: 'string',
            options: ['string'],
            details: [
                itf({
                    id: 'string',
                })
            ]
        },
    )
});

export const SourceOrder = itf({
    payload: itf(
        {
            expenseAdjustments: [
                itf({
                    businessType: 'number? | null',
                    details: [
                        itf({
                            id: 'string',
                        })
                    ]
                })
            ],
            claims: [
                itf({
                    businessType: 'number? | null',
                    details: [
                        itf({
                            id: 'string',
                        })
                    ]
                })
            ]
        },
    )
});

export const HistoryList = itf({
    payload: itf({
        content: [itf({
            id: 'string',
        })],
    })
});

export const HistoryDetail = itf({
    payload: itf({
        id: 'string',
    })
});
